<?php
$image = $this->data['RelatedImage']['image_name'];
if ($image != "") {
	$ext = strrchr($image, ".");
	$pos = strrpos($image, ".");
	$filename = substr($image,0,$pos);
	$image = $filename."_thumbnail".$ext;
}

echo $form->create('RelatedImage', array(
	'url'	=>	array(
		'plugin'		=>	'related_images',
		'controller'	=>	'manage',
		'action'		=>	'edit'
	),
	'enctype'	=>	'multipart/form-data'
));
echo $form->input('image_title', array('label'=>__("Tiêu đề: ", true), 'id'=>'edit_image_title'));
$options = array(
	'name'				=>	$image,
	'path'				=>	$configs['module']['RelatedImages']['thumbnail']['uri'],
	'field_name'		=>	'image',
	'label'				=>	__('Hình ảnh',true),
	'legend_title'		=>	__("Hình ảnh", true),
	//'delete_image_link'	=>	''
);
echo $html->form_image($options,array('id'=>'field_edit_image'));
echo $form->input('description', array('label'=>__("Mô tả ngắn: ", true), 'cols'=>77, 'id'=>'edit_image_description'));
echo $form->end(__('Cập nhật', true), array('id'=>'btnEditImageSubmit'));
?>